package controlLayer;
import modelLayer.*;

public class EmployeeCtr {
    
    private EmployeeContainer employeeContainer;
    
    public EmployeeCtr() {
        employeeContainer = EmployeeContainer.getInstance();
    }
    
    public void createEmployee(String name, String phone, String email, String address,
                int cprNo, String password, String department, String type) {
        Employee emp = new Employee(name, phone, email, address, cprNo, password, department, type);
        employeeContainer.addEmployee(emp);
    }
    
    public Employee findEmployee(int cprNo) {
        Employee emp = employeeContainer.findEmployee(cprNo);
        return emp;
    }
    
    public void removeEmployee(int cprNo) {
        Employee emp = findEmployee(cprNo);
        employeeContainer.removeEmployee(emp);
    }
}